angular.module('myApp')
  .controller('SelectCtrl', ['$scope', '$timeout', function ($scope, $timeout) {
    $scope.value = 'us';
    $scope.value1 = ['us'];
    $scope.loading = true;
    $scope.list = [{
        value: 'us',
        label: 'United States'
      },
      {
        value: 'ca',
        label: 'Canada'
      },
      {
        value: 'uk',
        label: 'United Kingdom'
      },
      {
        value: 'uk1',
        label: 'United Kingdom1'
      }
    ];
    $scope.list1 = [{
        value: 'us',
        label: 'United States',
        disabled: true
      },
      {
        value: 'ca',
        label: 'Canada'
      },
      {
        value: 'uk',
        label: 'United Kingdom'
      },
      {
        value: 'uk1',
        label: 'United Kingdom1'
      }
    ];
    $scope.onSelectChange = (option) => {
      $scope.loading = true
      console.log(option,$scope.loading);
      $timeout(() => {
        $scope.loading = false
      }, 100)
      console.log(option,$scope.loading);
    }
  }]);